<?php
class Model_GroupCategory extends MVC_MODEL {
	/**
	 * @var object SQL
	 */
	public $oDb_groupcategory;
	
	public function __construct(){
		parent::__construct();
		$this->oDb_groupcategory = new Db_GroupCategory();
	}
	
	public function insertGroupCategory()
	{
		return $this->oDb_groupcategory->doInsert($this->getAllData(),false);
	}
	
	public function getListGroupCategory()
	{
		return $this->oDb_groupcategory->getListGroupCategory($this);
	}
	
	public function updateGroupCategory()
	{
		return $this->oDb_groupcategory->doUpdateCategory($this->getAllData());
	}
	
	public function deleteGroupCategory($id)
	{
		return $this->oDb_groupcategory->doDeleteByPK($id);
	}
	
	public function getInfoGroupCategory($id)
	{
		return $this->oDb_groupcategory->getRecordsetByPK($id);
	}
	
	public function getListGroupChild($parent_id)
	{
		return $this->oDb_groupcategory->getListGroupChild($parent_id);
	}
	
	/**
	 * 
	 */
	public function getListSearchCategory()
	{
		return $this->oDb_groupcategory->getListSearchCategory($this);
	}
}
?>
	